import request from '@/util/request.js'

export const biddingResgisterService=(registerDate)=>{
    
    const params=new URLSearchParams()
    for(let key in registerDate){
        params.append(key,registerDate[key]);
    }
   return request.post('/bidder/register',params);
}
export const biddingLogin=(registerDate)=>{
    
    const params=new URLSearchParams()
    for(let key in registerDate){
        params.append(key,registerDate[key]);
    }
   return request.post('/bidder/login',params);
}

export const allbidder=()=>{
    return request.get('/bidder/AllBidder')
 }

 export const delectBidder=(id)=>{
    return request.put(`/bidder/deleteBidder?id=${id}`)
 }
 export const editBidder=(bidderData)=>{
    return request.put('/bidder/edit',bidderData)
 }

 export const getbidder=(username)=>{
    return request.get(`/bidder/user?username=${username}`)
}